<?php /* Smarty version 2.6.22, created on 2009-05-25 16:19:15
         compiled from myAdmin/tableView.sm */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'explode', 'myAdmin/tableView.sm', 129, false),array('modifier', 'count', 'myAdmin/tableView.sm', 154, false),)), $this); ?>
<table cellspacing="0" cellpadding="0" class="news" align="center" id="mytable">
   <tbody>
   <tr>
     <td colspan="20" class="top"><span class='a_browse'><?php echo $this->_tpl_vars['lg']['A_browse']; ?>
<b> <?php echo $this->_tpl_vars['tableAlias']; ?>
</b></span></td>
   </tr>
   <tr>
     <td colspan="20" >
       <div id='widget_tableDiv'>
         <div class="nums">
           <?php if (! $_POST['p'] || $this->_tpl_vars['pages'] == 1): ?>
             <?php $this->assign('p', 1); ?>
            <?php else: ?>
             <?php $this->assign('p', $_POST['p']); ?>
           <?php endif; ?>
            <div class="test" style="text-align:left">
              <a onclick="ajaz('page=tableAddRow&table=<?php echo $this->_tpl_vars['table']; ?>
')" title="Добавить"><img src="/js/images/add.png"/></a>
              <?php if ($_SESSION['key_field_value']): ?>
				<input type="button" onclick=ajaz("page=destroy_extra_session&table=<?php echo $this->_tpl_vars['table']; ?>
") value="Завершить заполнение" />
			  <?php endif; ?>
              <?php if ($_SESSION['lastSearch'] && $_SESSION['lastSearchT'] == $_POST['table']): ?>
                <a href="#" onclick="ajaz('page=tableView&search=clearsearch&table=<?php echo $this->_tpl_vars['table']; ?>
')" title="Очистить условия поиска">Очистить условия поиска</a>
              <?php endif; ?>
            </div>

           Страницы
           <?php if ($this->_tpl_vars['pages'] == 1): ?>
             <span class="arr disabled"><span>&larr;</span>&nbsp;предыдущая</span>
             <span class="arr disabled">&nbsp;следующая<span>&rarr;</span></span>
           <?php else: ?>
             <?php if ($this->_tpl_vars['p'] == $this->_tpl_vars['pages'] && $this->_tpl_vars['p'] != 1): ?>
               <span class="arr"><span>&larr;</span><a id="next_page" href="#" onclick="ajaz('page=tableView&table=<?php echo $this->_tpl_vars['table']; ?>
&p=<?php echo $this->_tpl_vars['p']-1; ?>
')">&nbsp;предыдущая</a>&nbsp;</span>
               <span class="arr disabled">&nbsp;следующая<span>&rarr;</span></span>
             <?php elseif (( $this->_tpl_vars['p'] == 1 || $this->_tpl_vars['p'] == 0 ) && $this->_tpl_vars['p'] != $this->_tpl_vars['pages']): ?>
               <span class="arr disabled"><span>&larr;</span>&nbsp;предыдущая</span>
               <span class="arr"><a id="next_page" onclick="ajaz('page=tableView&table=<?php echo $this->_tpl_vars['table']; ?>
&p=<?php echo $this->_tpl_vars['p']+1; ?>
')" href="#">следующая</a>&nbsp;<span>&rarr;</span></span>
             <?php else: ?>
               <span class="arr"><span>&larr;</span><a onclick="ajaz('page=tableView&table=<?php echo $this->_tpl_vars['table']; ?>
&p=<?php echo $this->_tpl_vars['p']-1; ?>
')" id="next_page" href="#">&nbsp;предыдущая</a>&nbsp;</span>
               <span class="arr"><a id="next_page" onclick="ajaz('page=tableView&table=<?php echo $this->_tpl_vars['table']; ?>
&p=<?php echo $this->_tpl_vars['p']+1; ?>
')" href="#">следующая</a>&nbsp;<span>&rarr;</span></span>
             <?php endif; ?>
           <?php endif; ?>
           <div id='pager' class="numbers">
           <?php if ($this->_tpl_vars['pages'] < 20): ?>
             <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'myAdmin/pager.sm', 'smarty_include_vars' => array('pages' => $this->_tpl_vars['pages'],'p' => $this->_tpl_vars['p'],'start' => 0,'count' => $this->_tpl_vars['pages'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
           <?php else: ?>
             <?php $this->assign('preLast', $this->_tpl_vars['pages']-1); ?>
             <?php $this->assign('deltaM', $this->_tpl_vars['p']-4); ?>
             <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'myAdmin/pager.sm', 'smarty_include_vars' => array('pages' => 1,'p' => $this->_tpl_vars['p'],'start' => 0,'count' => 1)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

             <?php if (( $this->_tpl_vars['p'] ) >= 5): ?>
               <?php if (( $this->_tpl_vars['p'] ) != 5): ?>
                 <a href="#">...</a>
               <?php endif; ?>
               <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'myAdmin/pager.sm', 'smarty_include_vars' => array('pages' => $this->_tpl_vars['pages'],'p' => $this->_tpl_vars['p'],'start' => $this->_tpl_vars['deltaM'],'count' => 7)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
               <?php if ($this->_tpl_vars['p'] <= ( $this->_tpl_vars['pages']-4 )): ?>
                 <?php if ($this->_tpl_vars['p'] != $this->_tpl_vars['pages']-4): ?>
                   <a href="#">...</a>
                 <?php endif; ?>
                 <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'myAdmin/pager.sm', 'smarty_include_vars' => array('pages' => $this->_tpl_vars['pages'],'p' => $this->_tpl_vars['p'],'start' => $this->_tpl_vars['preLast'],'count' => 1)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
               <?php endif; ?>
             <?php else: ?>
               <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'myAdmin/pager.sm', 'smarty_include_vars' => array('pages' => $this->_tpl_vars['pages'],'p' => $this->_tpl_vars['p'],'start' => 1,'count' => $this->_tpl_vars['p']+2)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
               <a href="#">...</a>
               <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'myAdmin/pager.sm', 'smarty_include_vars' => array('pages' => $this->_tpl_vars['pages'],'p' => $this->_tpl_vars['p'],'start' => $this->_tpl_vars['preLast'],'count' => 1)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
             <?php endif; ?>
           <?php endif; ?>
         </div>
        </div>
       <span style="padding: 5px 0px 0px 5px; color:black; font-size: 11px;">Удалить: <a href="#" class="deleteChecked"> отмеченные</a> / <a href="#" class="deleteChecked" rel="all"> все</a></span>
     </td>
   </tr>
   <tr id="theader">
     <?php $this->assign('rCount', 1); ?>
     <td class="filled" width="10%"><b><?php echo $this->_tpl_vars['lg']['A_actions']; ?>
</b></th>
     <td class="filled" width="5%"><input type="checkbox" class="mycheck_all" rel="<?php echo $this->_tpl_vars['p']; ?>
" table="<?php echo $this->_tpl_vars['table']; ?>
"/></td>
     <?php $_from = $this->_tpl_vars['alias']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['item']):
?>
       <?php $this->assign('colr', '#000000'); ?>
       <?php $this->assign('img', ''); ?>
       <?php if ($_SESSION['tfid'] == $this->_tpl_vars['item']['id']): ?>
         <?php if ($_SESSION['tford'] == 'asc'): ?>
           <?php $this->assign('oord', 'desc'); ?>
           <?php $this->assign('img', '/js/images/s_asc.png'); ?>
           <?php $this->assign('colr', '#009933'); ?>
         <?php else: ?>
           <?php $this->assign('oord', 'asc'); ?>
           <?php $this->assign('img', '/js/images/s_desc.png'); ?>
           <?php $this->assign('colr', '#990000'); ?>
         <?php endif; ?>
       <?php else: ?>
         <?php $this->assign('oord', 'asc'); ?>
       <?php endif; ?>
       <th><span style="cursor:pointer;color:<?php echo $this->_tpl_vars['colr']; ?>
" onclick="ajaz('page=alertSort&p=<?php echo $this->_tpl_vars['p']; ?>
&table=<?php echo $this->_tpl_vars['table']; ?>
&field=<?php echo $this->_tpl_vars['item']['id']; ?>
&order=<?php echo $this->_tpl_vars['oord']; ?>
')" >
         <b><?php echo $this->_tpl_vars['item']['alias']; ?>
<?php if ($this->_tpl_vars['img']): ?><img  border="0" src="<?php echo $this->_tpl_vars['img']; ?>
"/><?php endif; ?></b>
         </span></th>
       <?php $this->assign('rCount', $this->_tpl_vars['rCount']+1); ?>
     <?php endforeach; endif; unset($_from); ?>
   </tr>
  <?php if ($this->_tpl_vars['fields']): ?>
  <?php if ($this->_tpl_vars['rows']): ?>
    <?php $_from = $this->_tpl_vars['rows']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['item']):
?>
      <tr>
      	<td align="center" class="filled">
      		<span style="font-size: 10px;"><?php echo $this->_tpl_vars['item']['id']; ?>
</span>
            <img src="/js/images/edit.png" style="cursor:pointer; padding:0px; margin:0px;" onclick="ajaz('page=editValue&table=<?php echo $this->_tpl_vars['table']; ?>
&id=<?php echo $this->_tpl_vars['item']['id']; ?>
')" />
            <img src="/js/images/delete.png" style="cursor:pointer;  padding:0px; margin:0px;" onclick="ajaz('page=deleteRow&table=<?php echo $this->_tpl_vars['table']; ?>
&id=<?php echo $this->_tpl_vars['item']['id']; ?>
&p=<?php echo $this->_tpl_vars['p']; ?>
','<?php echo $this->_tpl_vars['lg']['MSG_delete']; ?>
?')"/>
          </td>
          <td class="filled" width="5%"><input type="checkbox" class="mycheck" value="<?php echo $this->_tpl_vars['item']['id']; ?>
" /></td>  
        <?php $_from = $this->_tpl_vars['alias']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['keyy'] => $this->_tpl_vars['itemm']):
?>
          <?php $this->assign('f', $this->_tpl_vars['itemm']['field']); ?>
          <td>
            <?php if ($this->_tpl_vars['itemm']['type'] == 'w_extended' || $this->_tpl_vars['itemm']['type'] == 'w_short' || $this->_tpl_vars['itemm']['type'] == 'fckeditor'): ?>
              <div style="height: 100px; overflow: auto; border: solid 1px;">
                <?php echo $this->_tpl_vars['item'][$this->_tpl_vars['f']]; ?>

              </div>
            <?php elseif ($this->_tpl_vars['itemm']['type'] == 'checkBox'): ?>
              <?php if ($this->_tpl_vars['item'][$this->_tpl_vars['f']] == 1): ?>
                <input type="checkbox" disabled="disabled" checked="checked"/>
                <font color="#008000"><?php echo $this->_tpl_vars['itemm']['check1']; ?>
</font>
              <?php else: ?>
                <input type="checkbox" disabled="disabled"/>
                <font color="#800000"><?php echo $this->_tpl_vars['itemm']['check0']; ?>
</font>
              <?php endif; ?>
             <?php elseif ($this->_tpl_vars['itemm']['type'] == 'smarty_checkbox'): ?>
             <?php $_from = $this->_tpl_vars['item'][$this->_tpl_vars['f']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
              <input type="checkbox" disabled="true" checked/><?php echo $this->_tpl_vars['i']; ?>
<br/>
             <?php endforeach; endif; unset($_from); ?>
             <?php elseif ($this->_tpl_vars['itemm']['type'] == 'images'): ?>
             <iframe  src="/control/imagemanager.php?mode=preview&images=<?php echo $this->_tpl_vars['item'][$this->_tpl_vars['f']]; ?>
" frameborder="0" width="650"></iframe>
            <?php elseif ($this->_tpl_vars['itemm']['type'] == 'photo'): ?>
              <?php $this->assign('arr', ((is_array($_tmp="|")) ? $this->_run_mod_handler('explode', true, $_tmp, $this->_tpl_vars['item'][$this->_tpl_vars['f']]) : explode($_tmp, $this->_tpl_vars['item'][$this->_tpl_vars['f']]))); ?>
              <?php $_from = $this->_tpl_vars['arr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['itemmm']):
?>
                <?php if ($this->_tpl_vars['itemmm']): ?>
                  <?php $this->assign('swf', ((is_array($_tmp=".")) ? $this->_run_mod_handler('explode', true, $_tmp, $this->_tpl_vars['itemmm']) : explode($_tmp, $this->_tpl_vars['itemmm']))); ?>
                  <?php if ($this->_tpl_vars['swf'][1] == 'swf'): ?>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="1" align="middle">
                      <param name="allowScriptAccess" value="sameDomain" />
                      <param name="allowFullScreen" value="false" />
                      <param name="movie" value="/images/<?php echo $this->_tpl_vars['itemm']['dest']; ?>
/<?php echo $this->_tpl_vars['itemmm']; ?>
" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" />
                      <embed src="/images/<?php echo $this->_tpl_vars['itemm']['dest']; ?>
/<?php echo $this->_tpl_vars['itemmm']; ?>
" quality="high" bgcolor="#000000" name="1" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                    </object>
                  <?php else: ?>
                    <img src='/images/<?php echo $this->_tpl_vars['itemm']['dest']; ?>
/<?php echo $this->_tpl_vars['itemmm']; ?>
'><br>
                    <a href="/images/<?php echo $this->_tpl_vars['itemm']['dest']; ?>
/<?php echo $this->_tpl_vars['itemmm']; ?>
" target="_blank"><?php echo $this->_tpl_vars['itemmm']; ?>
</a>
                  <?php endif; ?>
                <?php endif; ?>
              <?php endforeach; endif; unset($_from); ?>
            <?php else: ?>
              <?php echo $this->_tpl_vars['item'][$this->_tpl_vars['f']]; ?>
&nbsp;
            <?php endif; ?>
          </td>
        <?php endforeach; endif; unset($_from); ?>
      </tr>
    <?php endforeach; endif; unset($_from); ?>
    <?php else: ?>
    	<tr><td align="center" colspan="<?php $this->assign('ac', count($this->_tpl_vars['alias'])); ?><?php echo $this->_tpl_vars['ac']+2; ?>
"><b>В таблице нет записей</b></td></tr>
    <?php endif; ?>
  <?php else: ?>
    <?php echo $this->_tpl_vars['lg']['A_noData']; ?>

  <?php endif; ?>
  </tbody></table>
<span style="padding: 5px 0px 0px 15px; color:black; font-size: 11px;">Удалить: <a href="#" class="deleteChecked"> отмеченные</a> / <a href="#" class="deleteChecked" rel="all"> все</a></span>